package project;
import java.awt.image.RenderedImage;
import java.io.File;
import java.util.Stack;
import javax.swing.*;
import static project.PixieClasses.*;
import static project.PixieConstants.*;
import static project.PixieFactory.*;

public class GUIComponents {
    public static JPanel messageBar = new JPanel();
    public static JPanel fileMenuPanel = new JPanel();
	public static JTabbedPane topMenu  = new JTabbedPane();
    public static JPanel topPanel = new JPanel();
    public static JScrollPane displayArea = new JScrollPane();
    public static JPanel displayAreaPanel = new JPanel();
    public static JPanel bottomPanel = new JPanel();
    public static ImageContainer imageHolder = ImageContainer.getImageHolder();
    public static IconButton openFileButton = new IconButton(openIconPath, "Open an Image File");
    public static IconButton exitButton = new IconButton(closeIconPath, "Exit");
    public static IconButton saveButton = new IconButton(saveIconPath, "Save Changes");
    public static IconButton saveAsButton = new IconButton(saveAsIconPath, "Save As");
    public static JLabel bottomPanelMessage = new JLabel();
    public static JLabel mousePositionTracker = new JLabel();
    public static JCheckBox ratioCheck = new JCheckBox("Maintain Aspect Ratio", true);
    public static JSlider zoomSlider = new JSlider();
    public static DisplayToggle displaySwitch = new DisplayToggle();
    public static JFileChooser fileDialog = new JFileChooser();
    public static JLabel zoomLevel = new JLabel();
    public static JButton newSizeButton = new JButton("Resize");
    public static JPanel resizePanel = new JPanel();
    public static JPanel ratioPanel = new JPanel();
    public static ResizeSpinner newWidthInput = new ResizeSpinner(InputType.WIDTH);
    public static ResizeSpinner newHeightInput = new ResizeSpinner(InputType.HEIGHT);
    public static ResizeSpinner scaleInput = new ResizeSpinner(InputType.SCALE, new SpinnerNumberModel(100, 10, 1000, 1));
    public static JLabel sizeLabel = new JLabel("");
    public static JPanel editToolbar = new JPanel();
    public static JScrollPane editBarScoller = new JScrollPane(editToolbar);
    public static IconButton undoButton = new IconButton(undoIconPath, "Undo");
    public static IconButton redoButton = new IconButton(redoIconPath, "Redo");
    public static IconButton flipHorizontal = new IconButton(flipHorizIconPath, "Flip Horizontal");
    public static IconButton flipVertical = new IconButton(flipVertIconPath, "Flip Vertical");
    public static IconButton rotateCounterClockwise = new IconButton(rotCCWiconPath, "Rotate Counter-clockwise");
    public static IconButton rotateClockwise = new IconButton(rotCWiconPath, "Rotate Clockwise");
    public static IconButton increaseBrightness = new IconButton(brightenIconPath, "Increase Brightness");
    public static IconButton decreaseBrightness = new IconButton(darkenIconPath, "Decrease Brightness");
    public static IconButton sharpenImageButton = new IconButton(sharpIconPath, "Sharpen");
    public static IconButton blurImageButton = new IconButton(blurIconPath, "Blur");
/*    public static JMenuItem sketchButton = new JMenuItem("SKETCH", retrieveIcon(sketchIconPath));
    public static JMenuItem colorPaintButton = new JMenuItem("PAINT", retrieveIcon(paintIconPath));
*/    
    public static IconButton sketchButton = new IconButton(sketchIconPath, "SKETCH");
    public static IconButton colorPaintButton = new IconButton(paintIconPath, "PAINT");
    public static DropButton colorToneButton = new DropButton(colorsIconPath, "Color Tones");
    public static DropButton artButton = new DropButton(artIconPath, "Fake Art");
    public static DropButton resizeButton = new DropButton(resizeIconPath, "Resize");
    public static JPopupMenu resizeMenu = new JPopupMenu();
	public static JPanel msgPanel = new JPanel();
	public static JPanel midLayer = new JPanel();
	public static JPanel saveAsPanel = new JPanel();
	public static JPanel imageSizePanel = new JPanel();
	public static JPanel zoomPanel = new JPanel();
	public static JPanel mouseMotionPanel = new JPanel();
	public static SaveAsItem saveJPEG = new SaveAsItem("JPEG");
	public static SaveAsItem savePNG = new SaveAsItem("PNG");
	public static SaveAsItem saveBMP = new SaveAsItem("BMP");
	public static SaveAsItem saveTIFF = new SaveAsItem("TIFF");
	public static JPopupMenu saveAsMenu = new JPopupMenu();
	public static JPopupMenu colorMenu = new JPopupMenu();
	public static JPopupMenu artMenu = new JPopupMenu();

    public static File currentFile = null;
    public static RenderedImage currentImage = null;
    public static String currentFilePath;
    public static boolean changesSaved = true;
    public static Stack<RenderedImage> redoStack = new Stack<RenderedImage>();
    public static Stack<RenderedImage> undoStack = new Stack<RenderedImage>();

}
